<?php /* Smarty version Smarty-3.1.12, created on 2013-02-24 19:33:57
         compiled from "D:\wamp\www\acps_new\templates\tariffs\edit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:30938512a66546d4039-71448488%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '77934f0114543d18b815ab393504c557d67c4316' => 
    array (
      0 => 'D:\\wamp\\www\\acps_new\\templates\\tariffs\\edit.tpl',
      1 => 1361734367,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '30938512a66546d4039-71448488',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_512a66548e94c8_48097673',
  'variables' => 
  array (
    'data' => 0,
    'type' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_512a66548e94c8_48097673')) {function content_512a66548e94c8_48097673($_smarty_tpl) {?><ul class="subNavig">
    <li><a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=list_of_clients">Clients</a></li>
    <li><a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=list_of_users">Users</a></li>
    <li><a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=list_of_tariffs">Tariffs</a></li>
</ul>
<?php echo $_smarty_tpl->getSubTemplate ($_smarty_tpl->tpl_vars['data']->value['pathToError'], $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<script type="text/javascript">
    
        
    $(document).ready(function() {
        $(".float").change(function() {
            makeFloat(".float");
        });
    });
    
</script>
<h2 class="pageTitle">Edit tariff</h2>
<form class="adding" action="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=edit_tariff&tariff=<?php echo $_REQUEST['tariff'];?>
" method="post" onsubmit="return checkAdd_tariff(
                                                                    $('#title').val(),
                                                                    $('#tariff').val(),
                                                                    $('#servis_tariff').val(),
                                                                    $('#unit').val(),
                                                                    $('#type_of_record').val())
                                                                    ">
    <table class="tableForm">
        <tr>
            <td>
                <label for="title">Title <span class="red">*</span> </label>
            </td>
            <td>
                <input name="tariff_data[title]" id="title" type="text" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['tariff_data']['title'];?>
" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="tariff">Tariff<span class="red">*</span> </label>
            </td>
            <td>
                <input class="float" name="tariff_data[tariff]" id="tariff" type="text" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['tariff_data']['tariff'];?>
" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="servis_tariff">Servis tariff<span class="red">*</span> </label>
            </td>
            <td>
                <input class="float" name="tariff_data[servis_tariff]" id="servis_tariff" type="text" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['tariff_data']['servis_tariff'];?>
" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="unit">Unit<span class="red">*</span> </label>
            </td>
            <td>
                <input name="tariff_data[unit]" id="unit" type="text" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['tariff_data']['unit'];?>
" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="type_of_record">Type of timesheet-record<span class="red">*</span> </label>
            </td>
            <td>
                <select name="tariff_data[type_of_record]" size="1" id="type_of_record">
                    <option value="">Please select</option>
                    <?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['type']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['types_of_record']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
$_smarty_tpl->tpl_vars['type']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['type']->key;
?>
                        <option value="<?php echo $_smarty_tpl->tpl_vars['type']->value['Id'];?>
" <?php if ($_smarty_tpl->tpl_vars['type']->value['Id']==$_smarty_tpl->tpl_vars['data']->value['tariff_data']['type_of_record']){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['type']->value['type_of_record'];?>
</option>
                    <?php } ?>
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <label for="description">Description<span class="red"></span> </label>
            </td>
            <td>
                <textarea cols="60" rows="5" name="tariff_data[description]" id="description"><?php echo $_smarty_tpl->tpl_vars['data']->value['tariff_data']['description'];?>
</textarea>
            </td>
        </tr>
        <tr class="submitRow">
            <td>
                <input name="action" value="edit_tariff" type="hidden" />
            </td>
            <td>
                <input type="submit" value="Edit tariff" name="edit_tariff" /> &nbsp; 
                <span class="red">* Required</span>
            </td>
            <td></td>
        </tr>
    </table>
</form><?php }} ?>